package main

import (
	"basic-go/syntax/variables/demo"
	"fmt"
)

type MySlice []string

func main() {
	// var a int = 123
	// fmt.Println(a)
	// var b = 123
	// fmt.Println(b)

	fmt.Println(demo.Global)
	// fmt.Println(demo.internal)

	fmt.Println(demo.External)
	// demo.External = "a"
	// fmt.Println(demo.internalV1)
	fmt.Println(Status0, Status1, Status2, Status, Statusx, Statusy)
	fmt.Println(a, b, c, d, e, f, g)
	fmt.Println(x0, x1)

	fmt.Println("----------")
	mys := MySlice{"a", "b"}
	fmt.Println(mys)
	for index, my := range mys {
		fmt.Println(index, my)
	}

}

const (
	Status0 = iota
	Status1
	Status2
	Abc  = 3
	Sxxx = 4
	Sxx  = 8
	// Status = iota
	Status
	Statusx
	Statusy
)

const (
	a = iota // a == 0
	b        // b == 1
	c = 10   // c == 10, 手工赋值
	d        // d == 3, 继续使用iota，此时iota为3
	e
	f = iota
	g
)

const (
	x0 = 0 // 这里是0
	x1     // 这里复制了上一行的值,也是0
)
